﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Logon.aspx.cs" Inherits="Account_Logon" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
        <script type="text/javascript">

            function DoProcessEnterKey(htmlEvent) {
                if (htmlEvent.keyCode == 13) {
                        btn.DoClick();
                    }
                }
    </script>
</head>

<body style="align-content: center">
    <center>
    <form id="form1" runat="server" method="post" style="margin-top: 70px;">

    <div>
    
        <dx:ASPxRoundPanel ID="ASPxRoundPanel1" runat="server" Width="288px" 
            EnableTheming="True" HeaderText="Авторизация." HeaderStyle-HorizontalAlign="Center" 
            HorizontalAlign="Center" Theme="Metropolis" style="margin-left: 0px" EnableClientSideAPI="True" Height="48px">

<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
<PanelCollection>
<dx:PanelContent runat="server" SupportsDisabledAttribute="True">
        <dx:ASPxLabel ID="ASPxLabel1" runat="server" Text="Выберите пользователя" Width="100%">
        </dx:ASPxLabel>
        <dx:ASPxComboBox ID="cbb_fio" runat="server" Height="18px" Width="100%" AutoPostBack="false"
        AutoResizeWithContainer="True" EnableClientSideAPI="True" ValueType="System.Int32" DropDownStyle="DropDownList"
        IncrementalFilteringMode="StartsWith" OnSelectedIndexChanged="cbb_fio_SelectedIndexChanged"
        TextField ="FIO" ValueField="CODE" style="margin-left: 0px">
            <ValidationSettings ValidationGroup="LoginUserValidationGroup" ErrorTextPosition="Bottom">
                <RequiredField ErrorText="Выберите пользователя." IsRequired="true" />
            </ValidationSettings>
    </dx:ASPxComboBox>
        <dx:ASPxLabel ID="ASPxLabel2" runat="server" Text="Укажите организацию" Width="100%">
        </dx:ASPxLabel>
    <dx:ASPxComboBox ID="cbb_kontr" runat="server" AutoPostBack="false" Height="18px"
        Width="100%" AutoResizeWithContainer="True" ValueType="System.Int32" TextField="NAME" ValueField="KONTRAGENT" 
        ClientInstanceName="cbb_kontr">
            <ValidationSettings ValidationGroup="LoginUserValidationGroup" ErrorTextPosition="Bottom">
                <RequiredField ErrorText="Укажите организацию." IsRequired="true" />
            </ValidationSettings>
        </dx:ASPxComboBox>
        <dx:ASPxLabel ID="ASPxLabel3" runat="server" Text="Введите пароль" Width="100%">
        </dx:ASPxLabel>
    <div class="form-field">
        <dx:ASPxTextBox ID="tbPassword" runat="server" Password="true" Width="100%">
            <ValidationSettings ValidationGroup="LoginUserValidationGroup" ErrorTextPosition="Bottom">
                <RequiredField ErrorText="Введите пароль." IsRequired="true" />
            </ValidationSettings>
            <ClientSideEvents KeyDown="function(s, e) { DoProcessEnterKey(e.htmlEvent); }" />
        </dx:ASPxTextBox>
        </div>

        <dx:ASPxButton ID="btnLogin" runat="server" Text="Войти" ValidationGroup="LoginUserValidationGroup" 
            AutoPostBack="False" ClientInstanceName="btn" UseSubmitBehavior="true"
            OnClick="btnLogin_Click">
        </dx:ASPxButton>
    </dx:PanelContent>
</PanelCollection>

        </dx:ASPxRoundPanel>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server"></asp:SqlDataSource>
    </div>
    </form>
        </center>
</body>
</html>
